feat:Add opt‑in navigation handler for external URLs#5531
Merged
jkelleyrtp merged 4 commits intoDioxusLabs:mainfrom May 7, 2026
Merged
feat:Add opt‑in navigation handler for external URLs#5531jkelleyrtp merged 4 commits intoDioxusLabs:mainfrom
jkelleyrtp merged 4 commits intoDioxusLabs:mainfrom
Conversation
The branches should be reorder so that the branch that checks for the index and assets is always taken first. Otherwise, they will fail to load for users who forget to allow them in their custom handlers, which will be a crappy experience and hard to debug.
Contributor
Author
|
I have tested this in a local app and works as expected. |
jkelleyrtp
added a commit
that referenced
this pull request
May 7, 2026
* feat:Add opt‑in navigation handler for external URLs (#5531) * add navigation handler config option code from #5231 * Re-order branches The branches should be reorder so that the branch that checks for the index and assets is always taken first. Otherwise, they will fail to load for users who forget to allow them in their custom handlers, which will be a crappy experience and hard to debug. * remove return * Change behavior when handler not set --------- Co-authored-by: not a cow <agielow@proton.me> * fix: allow navigations but disallow external nav --------- Co-authored-by: Martin Martinez Rivera <mrtnz.rvr@gmail.com> Co-authored-by: not a cow <agielow@proton.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pretty much the same as #5231, which was closed without comment.
Without this change, iframes will open in an external browser, breaking existing apps and disallowing many legitimate uses like embedding a YouTube video, etc.
One change was made after discussing it with @jkelleyrtp, which was to make all URLs navigable by default when the handler is not set. That way, only users which need finer control over this have to set the handler.